package Fyysika_Ylesanded;

public class yl18 {

	double v2;
	double kaugus = (int)(Math.random()*4+1);
	public String tekst(){
		return"<html>Kui suur on elektrivälja tugevus "+kaugus+" m kaugusel punktlaengust, mille suurus on 4.0nC?</html>";
	}
	
	public String joonisepath(){
		return "hh";
	}
	public String[] vastusevariandid(){
		double vastus = 36/(kaugus*kaugus);
		double v1 = Math.rint((Math.random()*10)*10.0d )/10.0d;
		v2 = Math.rint(vastus*10.0d)/10.0d;
		double v3 = Math.rint((Math.random()*20)*10.0d )/10.0d;
		double v4 = Math.rint((Math.random()*5)*10.0d )/10.0d;
		String [] vastused ={v1+" N/C",v2+" N/C",v3+" N/C",v4+" N/C"};
		
		return vastused;
	}
	
	public String[] oiged(){
		String oigedv[]={v2+" N/C"};
		return oigedv ;
	}
	
	public String vihje(){
		return" E = (k*q)/r\u00b2  ";
	}	
}

